package com.example.studyroom.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.studyroom.Entity.SuperAdmin;
import com.example.studyroom.Entity.User;
import com.example.studyroom.mapper.SuperAdminMapper;
import com.example.studyroom.service.SuperAdminService;
import org.springframework.stereotype.Service;


@Service
public class SuperAdminServiceImpl extends ServiceImpl<SuperAdminMapper, SuperAdmin> implements SuperAdminService {

    @Override
    public SuperAdmin findBySuperAdminLogin(String sname,String spass) {
        LambdaQueryWrapper<SuperAdmin> queryWrapper = Wrappers.lambdaQuery(SuperAdmin.class)
                .eq(SuperAdmin::getSname, sname)
                .eq(SuperAdmin::getSpass, spass);

        return getOne(queryWrapper);
    }
}


